home *** CD-ROM | disk | FTP | other *** search
- Path: news.cais.com!news
- From: jcastro@ids2.idsonline.com (Jose Castro)
- Newsgroups: comp.lang.c
- Subject: Q: waiting processes and signals
- Date: Thu, 21 Mar 1996 23:46:11 GMT
- Organization: Capital Area Internet Service info@cais.com 703-448-4470
- Message-ID: <4isppb$l1q@news.cais.com>
- NNTP-Posting-Host: ip171.idsonline.com
- X-Newsreader: Forte Free Agent 1.0.82
-
- int onsignal()
- {
- printf("Hello\n");
- }
-
- server()
- {
-
- signal( SIGUSR1, onsignal)
-
- wait on socket
-
- read data
-
- print data
-
- close socket
- }
-
- When I send the signal (kill -USR1 pid) I get the Hello message,
- BUT my process read something from the socket and terminates.
-
- I know that when a signal is received on a waiting process and the
- signal handler returns( Same as above) the system call that causes
- the wait( in this case the listen from the socket) returns and erno =
- EINTR. Some how I have to tell my server to continue waiting after
- the signal has been process. How do I do it????
-
-
- Thanks
-
-